import React, { lazy } from "react";
import {
  TeamOutline,
  AppstoreOutline,
  FileOutline,
  CalendarOutline,
  ShopbagOutline,
} from "antd-mobile-icons";
const Layout = lazy(() => import("../Pages/layout/Index")); //框架layout页面
const Home = lazy(() => import("../Pages/home/Index")); // 首页页面
const My = lazy(() => import("../Pages/my/Index")); //我的页面
const Login = lazy(() => import("../Pages/login/Index")); //登录页面
const JKshop = lazy(() => import("../Pages/jkshop/Index")); //健康商城
const Jk = lazy(() => import("../Pages/jl+/Index")); //健康
const Kepu = lazy(() => import("../Pages/Kepu/Index")); //科普
const Yisheng = lazy(() => import("../Pages/yisheng/Index")); //医生
const Huiyuan = lazy(() => import("../Pages/huiyuan/Index")); //会员
const Mytaocan = lazy(() => import("../Pages/mytaocan/index")); //我的套餐
const Youhuijuan = lazy(() => import("../Pages/youhuijuan/Index")); //优惠卷
const Myzhanghu = lazy(() => import("../Pages/myzhanghu/Index")); //我的账户
const Zhanghuchakan = lazy(() => import("../Pages/zhanghuchakan/Index")); //账户查看
const Quduihuan = lazy(() => import("../Pages/quduihuan/Index")); //去兑换
const TabDetitle = lazy(() => import("../Pages/home/TabDetitle/Index")); //主页tab详情
const Search = lazy(() => import("../Pages/Search/Index")); //主页搜索
const Look = lazy(() => import("../Pages/home/Lookdoctor/Index")); //看医生
const Yhxq = lazy(() => import("../Pages/yhxq/Index")); //医生详情
const Shouhuodizhi = lazy(() => import("../Pages/shouhuodizhi/index")); //收货地址
const JkshopSerch = lazy(() => import("../Pages/jkshop/serch/index")); //健康商城搜索
const Fast = lazy(() => import("../Pages/home/fast/Index")); //聊天室
const Xinzengdizhi = lazy(() => import("../Pages/xinzengdizhi/Index")); //新增地址
const JKDetail = lazy(() => import("../Pages/jkshop/detail/index")); // 健康商城详情
const Plan = lazy(() => import("../Pages/plan/index")); // 健康计划
const Lutation = lazy(() => import("../Pages/lutation/index")); // 健康测评
const Curve = lazy(() => import("../Pages/curve/index")); //宝宝成长曲线
const Adviser = lazy(() => import("../Pages/adviser/index")); //健康顾问
const Bpk = lazy(() => import("../Pages/bpk/index")); //育儿知识
const Archives = lazy(() => import("../components/Card/index")); //健康档案
const Hyxq1 = lazy(() => import("../Pages/hyxq1/Index")); //会员详情1
const ShopEvents = lazy(() => import("../Pages/jkshop/shopevents/index")); //商城活动
const Xieyi = lazy(() => import("../Pages/xieyi/Index")); //隐私协议
const Vaccine = lazy(() => import("../Pages/jl+/vaccine/index")); //疫苗时间
const Tu1 = lazy(() => import("../Pages/home/tu1/index")); //首页跳转
const Tu2 = lazy(() => import("../Pages/home/tu1/tu2/index")); //首页跳转
const Tu3 = lazy(() => import("../Pages/home/tu1/tu3/index")); //首页跳转
const Tu4 = lazy(() => import("../Pages/home/tu1/tu4/index")); //首页跳转
const Tu5 = lazy(() => import("../Pages/home/tu1/tu5/index")); //首页跳转
const Cart = lazy(() => import("../Pages/jkshop/cart/index")); //购物车

export const RouteChildren = [
  {
    path: "/home",
    element: <Home />,
    meta: {
      table: "春雨",
      icon: <AppstoreOutline />,
    },
  },
  {
    path: "/shop",
    element: <JKshop />,
    meta: {
      table: "商城",
      icon: <ShopbagOutline />,
    },
  },
  {
    path: "/jk",
    element: <Jk />,
    meta: {
      table: "健康+",
      icon: <CalendarOutline />,
    },
  },
  {
    path: "/kepu",
    element: <Kepu />,
    meta: {
      table: "科普",
      icon: <FileOutline />,
    },
  },
  {
    path: "/my",
    element: <My />,
    meta: {
      table: "我的",
      icon: <TeamOutline />,
    },
  },
];

// 一级页面
export const routers = [
  {
    path: "/",
    element: <Layout />,
    meta: {
      table: "主页面",
    },
    children: RouteChildren,
  },

  {
    path: "/login",
    element: <Login />,
    meta: {
      table: "登录",
    },
  },
  {
    path: "/fast",
    element: <Fast />,
    meta: {
      table: "快速问诊",
    },
  },
  {
    path: "/plan",
    element: <Plan />,
    meta: {
      table: "健康计划",
    },
  },
  {
    path: "/lutation",
    element: <Lutation />,
    meta: {
      table: "健康测评",
    },
  },
  {
    path: "/curve",
    element: <Curve />,
    meta: {
      table: "宝宝生长曲线",
    },
  },
  {
    path: "/adviser",
    element: <Adviser />,
    meta: {
      table: "春雨健康顾问",
    },
  },
  {
    path: "/bpk",
    element: <Bpk />,
    meta: {
      table: "育儿知识",
    },
  },
  {
    path: "/tabdetitle",
    element: <TabDetitle />,
    meta: {
      table: "医生",
    },
  },
  {
    path: "/search",
    element: <Search />,
    meta: {
      table: "搜索",
    },
  },
  {
    path: "/look",
    element: <Look />,
    meta: {
      table: "医生",
    },
  },
  {
    path: "/shop/shopSerch:item",
    element: <JkshopSerch />,
  },
  {
    path: "/jkshop/detail:item",
    element: <JKDetail />,
  },
  {
    path: "/yisheng",
    element: <Yisheng />,
    meta: {
      table: "医生",
    },
  },
  {
    path: "/huiyuan",
    element: <Huiyuan />,
    meta: {
      table: "会员",
    },
  },
  {
    path: "/mytaocan",
    element: <Mytaocan />,
    meta: {
      table: "套餐包",
    },
  },
  {
    path: "/youhuijuan",
    element: <Youhuijuan />,
    meta: {
      table: "优惠券",
    },
  },
  {
    path: "/myzhanghu",
    element: <Myzhanghu />,
    meta: {
      table: "我的账户",
    },
  },
  {
    path: "/zhanghuchakan",
    element: <Zhanghuchakan />,
    meta: {
      table: "账户查看",
    },
  },
  {
    path: "/quduihuan",
    element: <Quduihuan />,
    meta: {
      table: "去兑换",
    },
  },
  {
    path: "/yhxq",
    element: <Yhxq />,
    meta: {
      table: "优惠详情",
    },
  },
  {
    path: "/shouhuodizhi",
    element: <Shouhuodizhi />,
    meta: {
      table: "收货地址",
    },
  },
  {
    path: "/xinzengdizhi",
    element: <Xinzengdizhi />,
    meta: {
      table: "新增地址",
    },
  },
  {
    path: "/archives",
    element: <Archives />,
    meta: { table: "档案" },
  },
  {
    path: "/hyxq1",
    element: <Hyxq1 />,
    meta: {
      table: "会员详情",
    },
  },
  {
    path: "/xieyi",
    element: <Xieyi />,
    meta: {
      table: "协议",
    },
  },
  {
    path: "/ShopEventsDetail:item",
    element: <ShopEvents />,
    meta: { table: "商城" },
  },
  {
    path: "/vaccine",
    element: <Vaccine />,
    meta: { table: "疫苗" },
  },
  {
    path: "/tu1",
    element: <Tu1 />,
  },
  {
    path: "/tu2",
    element: <Tu2 />,
  },
  {
    path: "/tu3",
    element: <Tu3 />,
  },
  {
    path: "/tu4",
    element: <Tu4 />,
  },
  {
    path: "/tu5",
    element: <Tu5 />,
  },
  {
    path: "/cart",
    element: <Cart />,
  },
];
